﻿
using Medianamik.Core.DAL;
using Medianamik.Core.DAL.Repositories;
using Medianamik.Core.DAL.Services;
using SubSonic;

namespace Medianamik.UI.Web.Shop.Data.Repositories
{
    public class PaymentProviderBaseRepository<TCollection, TItem> : 
        MedianamikRepository<TCollection, TItem>,
        IPaymentProviderBaseRepository<TItem>
        where TItem : Interfaces.IPaymentProviderBase, IRecordBase, new()
        where TCollection : ICollectionWithChildren<TCollection, TItem>, new()
    {
        public PaymentProviderBaseRepository(ICultureService cultureService, 
            IContentStateService contentStateService, INodeMapper nodeMapper) 
            : base(cultureService, contentStateService, nodeMapper)
        {
        }
    }

    public class PaymentProviderBaseRepository : PaymentProviderBaseRepository<PaymentProviderBaseCollection, PaymentProviderBase>, IPaymentProviderBaseRepository
    {
        public PaymentProviderBaseRepository(ICultureService cultureService, IContentStateService contentStateService, INodeMapper nodeMapper)
            : base(cultureService, contentStateService, nodeMapper)
        {
        }
    }

    public interface IPaymentProviderBaseRepository<T> : IMedianamikRepository<T>
        where T : Interfaces.IPaymentProviderBase
    {
    }

    public interface IPaymentProviderBaseRepository: IPaymentProviderBaseRepository<PaymentProviderBase>
    {      
    }
}
